<!DOCTYPE html>
<html>
<!-- head -->
{include file="common/page/head"}
<link rel="stylesheet" href="__app__/admin/view/BaseConfig/configList.css" />
<body>
<!---------------- 配置页面 ------------------->
<!-- 页头 -->

{include file="common/page/header"}
<!-- jsfiles -->
{include file="common/page/jsfiles"}
<link type="text/css" rel="stylesheet" href="__static__/js/umeditor/themes/default/css/umeditor.min.css" >
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/third-party/template.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/umeditor.min.js"></script>
<script type="text/javascript" src="__static__/js/umeditor/lang/zh-cn/zh-cn.js"></script>
<!-- 主体 -->
<div class="content container-fluid {if $leftBarScale eq '1'} scale {/if} ">
    <div class="row">
        <div class="col-md-2 left-section">
            <!-- 左导航菜单 -->
            {include file="common/page/menu"}
        </div>
        <div class="col-md-10 right-section">
            <!-- 菜单历史记录 -->

            <!--内容区域-->
            <h3><i class="icon iconfont">{$Think.session.currentMenu.icon}</i>{$Think.session.currentMenu.menuTitle}
            </h3>
            <div class="inner-section row">
                <div class="item table-responsive">
                    <form action="#" method="post" enctype="multipart/form-data">
                        <div id="normal-config" class="item table-responsive">
                            <table class="table table-striped table-hover table-bordered table-base">
                                <tbody>
                                <tr>
                                    <th style="width: 200px;">名称</th>
                                    <th style="width:600px">内容</th>
                                    <th>提示</th>
                                </tr>
                            {foreach name="configInfo" item="item"}
                                <tr>
                                    <td>{$item.label}</td>
                                    <td>
                                    	{if $item.type eq 'radio'}
	                                        <label class="radio-inline myradio">
	                                            <input type="radio" name="{$item.item_key}"  value="1" {if $item.item_value eq '1'} checked="true" {/if} >&nbsp; 是
	                                        </label>
	                                        <label class="radio-inline myradio">
	                                            <input type="radio" name="{$item.item_key}"  value="0" {if $item.item_value eq '0'} checked="true" {/if} >&nbsp; 否
	                                        </label>
                                        {elseif $item.type eq 'select'}
	                                        <select name="{$item.item_key}">
	                                            {foreach name="$item.box" key="name" item="value"}-->
	                                            	<option value="{$value}" {if $item.item_value eq $value} selected {/if} >{$value}</option>
	                                            {/foreach}
	                                        </select>
                                        {elseif $item.type eq 'text'}
                                        	<input type="text" name="{$item.item_key}" value="{$item.item_value}" size="80" >
                                        {elseif $item.type eq 'image'}
                                            {if condition="$item.item_value"}
                                            <input type="file" name="{$item.item_key}" size="18" style="line-height: 0px;">
                                            <input type="hidden" value="{$item.item_value}" name="{$item.item_key}">
                                            <img src="{$Think.const.ROOT_URL}{$item.item_value}" style="width:40px;height:40px;">
                                            {else}
                                            <input type="file" name="{$item.item_key}" size="18" style="line-height: 0px;">
                                            {/if}
                                        {elseif $item.type eq 'file'}
                                        	<input type="file" name="{$item.item_key}" size="18" style="line-height: 0px;">

                                        {elseif $item.type eq 'textarea'}
                                            <textarea name="{$item.item_key}" rows="8">{$item.item_value}</textarea>
                                        {elseif $item.type eq 'richText'}
                                            <!-- umeditor -->
                                           	<script type="text/plain" id="{$item.item_key}" name="{$item.item_key}" style="width:680px;height:300px;">{$item.item_value}</script>
                                            <script type="text/javascript">
                                                //实例化编辑器
                                                var um = UM.getEditor('{$item.item_key}');
                                            </script>
                                            <!-- /umeditor -->
                                        {/if}
                                    </td>
                                    <td>
                                    	<span style="color:#999;">{$item.tip}</span>
                                    </td>
                                </tr>
                            {/foreach}
                                <tr>
                                    <td></td>
                                    <td>
                                        <button class="btn btn-primary submit" type="submit">提交</button>
                                    </td>
                                    <td></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 页脚 -->
{include file="common/page/footer"}

<script type="text/javascript" src="__app__/admin/view/BaseConfig/configList.js"></script>
</body>
</html>